package com.example.demo.action

import org.springframework.stereotype.*
import xyz.erupt.tpl.annotation.*

@EruptTpl
@Service
class FreemarkerAction {
    @TplAction(value = "freemarker.ftl")
    fun dashboard(): Map<String, Any> {
        val map: MutableMap<String, Any> = HashMap()
        val mp: MutableMap<String, Any> = LinkedHashMap()
        mp["annotation"] = 'E'
        mp["core"] = 'R'
        mp["auth"] = 'U'
        mp["web"] = 'P'
        mp["mongodb"] = 'T'
        mp["bi"] = '-'
        mp["job"] = '-'
        mp["tpl"] = '-'
        mp["generator"] = '-'
        map["color"] = arrayOf(
            "#eb776e", "#56aad6", "#69d5e7", "#f686e5", "#29ae94", "#fbd364",
            "#4da1ff", "#ff6e4b", "#ffc524", "#e07de9", "#42e9e1", "#a9f", "#a90",
            "#09f", "#928bff"
        )
        map["map"] = mp
        return map
    }
}